home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / WORDMISC / BANNER.LZH / FONTSY.DOC < prev    next >
Text File  |  1986-09-06  |  21KB  |  578 lines

  1.                 FONTSY
  2.  
  3.              Multiple Font Banner Printer
  4.  
  5.               MS-DOS Version 2.1  9/6/86
  6.  
  7.              (C) 1985,1986 Merlin R. Null
  8.  
  9. This Archive should contain:
  10.  
  11. FONTSY    .EXE    Multiple font banner printer
  12. FONTSY    .BAS    QuickBASIC source for the above
  13. FSY    .ASM    Source for fast video routines for Fontsy
  14. FONTSY    .DOC    This documentation
  15. FONTCODE.EXE    Tool for modifying fonts
  16. FONTCODE.BAS    QuickBASIC source for the above
  17. FCD    .EXE    Fast video routines for Fontcode
  18.  
  19. The compiled QuickBASIC programs should run on most MS-DOS machines.
  20. The external runtime package is not required.
  21.  
  22. Nineteen fonts are included in the archive.
  23.  
  24. CLARE.FNT    Clarendon short version
  25.  
  26. A 70 column 54 character serifed font with upper case only.  It will
  27. print in 80 columns.
  28.  
  29. CLARENDN.FNT    Clarendon full version
  30.  
  31. The same font with full lower case added.  It requires over 100
  32. columns due to the additional descender space required for g, p, q
  33. and y.
  34.  
  35. FUTURA.FNT    Futura Black
  36.  
  37. A 46 column 94 character very strange font sometimes used in small
  38. amounts in advertising.  It is a full font.
  39.  
  40. HERON.FNT
  41.  
  42. A 50 column high 94 character, serifed font.  My first attempt at a
  43. font.  It was not derived from anything in particular.
  44.  
  45. KIWI.FNT
  46.  
  47. Similar to Heron, but boldface.
  48.  
  49. RAVEN.FNT
  50.  
  51. A 65 column 56 character sans serif font with upper case only.
  52.  
  53. GOTHIC.FNT    Old English
  54.  
  55. The Gothic font is large enough that it will not fit in 80 columns.
  56. I use 17 pitch and reduced linefeeds to make it work on the standard
  57. size tractor feed paper. Contains 77 characters.
  58.  
  59. GOTHIC2.FNT    Old English small version
  60.  
  61. A smaller version of the above.
  62.  
  63. GOTHIC2R.FNT    Old English small version reverse
  64.  
  65. Reverse printing version of Gothic2.
  66.  
  67. AM.FNT        American Standard
  68.  
  69. A 23 column 94 character small font
  70.  
  71. AMI.FNT        American Standard Italic
  72.  
  73. As above but Italic
  74.  
  75. AMV.FNT        American Standard Vertical
  76.  
  77. Vertical version of AM.FNT
  78.  
  79. AMVI.FNT    American Standard Vertical Italic
  80.  
  81. Vertical version of AMI.FNT
  82.  
  83. GREEK.FNT    Greek Standard
  84.  
  85. A 23 column 24 character Greek alphabet with upper case only.
  86.  
  87. GREEKI.FNT    Greek Standard Italic
  88.  
  89. As above in Italic
  90.  
  91. GREEKV.FNT    Greek Standard Vertical
  92.  
  93. Vertical version of GREEK.FNT
  94.  
  95. GREEKVI.FNT    Greek Standard Vertical Italic
  96.  
  97. Vertical version of GREEKI.FNT
  98.  
  99. DINGBAT.FNT    Designs
  100.  
  101. Not really a font, but graphic designs.
  102.  
  103. CLIP.FNT
  104.  
  105. Clip Art
  106.  
  107. Fontsy was written because I needed a better sign making program for
  108. LOSCON, the annual Science Fiction convention of the Los Angeles
  109. Science Fantasy Society.  In 1984 the only useable banner program I
  110. had was GOTHIC.  I found the old public domain banner program much
  111. too crude for good signs and they are too light to be read across a
  112. large room.  I also wanted to have several fonts on line.  The
  113. original version of Fontsy was written in MBASIC for the CP/M basic
  114. compiler.  The MS-DOS version has changed a lot.  Color, fast
  115. assembly language video routines and a number of new options have
  116. been added.
  117.  
  118. The best effect can be obtained with Fontsy by using solid graphic
  119. blocks available on most dot matrix printers or by downloading a
  120. block in place of one character.  If this is not available or you
  121. have a letter quality printer, use the @ sign as the print character.
  122. All fonts are set to use the @ sign in the 2.0 release of Fontsy.
  123. This can be changed on the fly with Fontsy or changed permanently
  124. with either Fontsy or Fontcode.
  125.  
  126.  
  127.              Running Fontsy
  128.  
  129. You will be prompted to enter the name of the font.  The extension
  130. .FNT is not required.  If you do not recall what fonts are available,
  131. just enter a drive name (A:) or path (c:\fsy\) to get a list of fonts
  132. on that drive/directory.  The trailing backslash is required for a
  133. subdirectory listing.
  134.  
  135. The font can also be entered from the DOS command line.  Example:
  136.  
  137. C:\FONTSY GOTHIC
  138.  
  139. At the next prompt you have two choices.  You may enter your banner
  140. text followed by a <RETURN> to print your banner.  Or a <RETURN>
  141. without any text input will take you to the menu to change default
  142. font parameters or fonts.  The print screen with HERON.FNT loaded
  143. looks like this:
  144.  
  145.  
  146.      FONTSY  version 2.0  9/3/86  (C) 1985, 1986  Merlin R. Null
  147.  
  148.  
  149.  
  150.  
  151.           Heron version 1.1 (C) 1985 Merlin R. Null
  152.  
  153.  
  154.  
  155.               Available characters are:
  156.  
  157.      space ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = >
  158.      ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _
  159.      ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~
  160.  
  161.            <Return> for options ^C to exit
  162.  
  163.  
  164. Banner text ? _
  165.  
  166.  
  167. Only the characters listed above the prompt are available for the
  168. particular font you are using.  If a lower case letter is missing
  169. from the font, Fontsy will substitute the upper case letter.  If any
  170. other character is not available, Fontsy will ignore your input for
  171. that character only.  In the example above a full character set is
  172. available, so all printing characters may be used.
  173.  
  174. If you enter <Return>, you will see the following menu:
  175.  
  176.  
  177.                 Font Options
  178.  
  179.  
  180.     1  Change Fonts                is: HERON.FNT
  181.  
  182.     2  Set column to start printing        is: Column 7
  183.  
  184.     3  Set print character            is: 64 decimal
  185.  
  186.     4  Set banner spacing            is: 3 rows
  187.  
  188.     5  Toggle character width        is: Single
  189.  
  190.     6  Toggle character height        is: Single
  191.  
  192.     7  Printer initialization string
  193.  
  194.     8  Save changes to disk
  195.  
  196.     <Return> Enter banner text
  197.  
  198. Option or <RETURN> ? _
  199.  
  200.  
  201. Option 1  Change Fonts
  202.  
  203. Simply goes back to the initial screen to enter a new font.  The
  204. initial screen would have been bypassed, if you loaded a font
  205. directly from DOS.
  206.  
  207. Option 2  Set column to start printing
  208.  
  209. Allows you to reset the amount of space under the banner.  This
  210. option can be used to set for more than one line of text with smaller
  211. fonts.  To do so you must turn the printer off and roll the paper
  212. back to the start of the first line and redo any printer preset.
  213.  
  214. Option 3  Set print character
  215.  
  216. Allows you to change the print character.  In the distribution fonts
  217. this is set to the @ sign.  This is because the @ sign is the densest
  218. character of the standard set.  You may change this to any other
  219. printable character available in your printers character set by
  220. simply entering it at the prompt.
  221.  
  222. You can enter characters with the 8th bit set by entering the decimal
  223. value of the character you wish to use.  If you want to specify a
  224. character by its ASCII decimal number, it must be at least two
  225. characters long.  Numbers over 255 will be rejected.
  226.  
  227. Entering 255 causes the large characters in the banner to be printed
  228. with their own small characters.  <Return> retains the current value.
  229.  
  230. Option 4  Set banner spacing
  231.  
  232. Allows you to set the number of rows between the large characters in
  233. the banner.  Once this option is set the default value included with
  234. the font is lost.  If you want the font default value back and forgot
  235. what the value was, you should reload the font with option 1.  A
  236. <Return> at "Number of rows?" retains the current value.
  237.  
  238. Option 5  Toggle character width
  239.  
  240. You may set printing to double or triple width.  This repeats each
  241. row 2 or 3 times.  It produces a much more blocky font.  I use double
  242. width with the CLARE font along with presetting half normal linefeeds
  243. (6/72 or 12/144) at 10 pitch.  This produces just about the largest
  244. possible characters on 8 inch wide paper.
  245.  
  246. Option 6  Toggle character height
  247.  
  248. Set double, triple or half height.  Double or triple height can only
  249. be used on the smaller fonts.  It can be used in combination with
  250. option 5 to produce some really hugh letters on wide paper.
  251.  
  252. Half height works well with some fonts, and not quite perfect with
  253. others.  The reason is that the number of small characters to print
  254. is calculated with integer division.  This can result in an extra
  255. pixel here and there.  If you use this a lot, consider using Fontcode
  256. to generate a half height font.
  257.  
  258. Option 7  Printer initialization string
  259.  
  260. Actually, printer initialization and printer reset strings.  Since
  261. QuickBASIC allows strings of up to 32,767 bytes in length, you can
  262. use almost anything you want.
  263.  
  264. Use this to preset a font for your printer.  Most fonts produce
  265. better results with reduced linefeeds (about 6/72) and 17 pitch.  You
  266. need to be familiar with your printer commands or at least have the
  267. manual handy.
  268.  
  269. The printer strings are entered one byte at a time by entering the
  270. decimal value for each byte.
  271.  
  272. You could even enter a download character via this string.
  273.  
  274. If you use the preset string, you should also use the printer reset
  275. string so that when Fontsy is done the printer returns to normal.
  276.  
  277. If you use this option, I suggest you make sure the font is working
  278. correctly and then save the changes to disk with option 8.
  279.  
  280. Option 8  Save changes to disk
  281.  
  282. Changes made to font defaults at this menu may be made permanent for
  283. the loaded font. The modified font will overwrite the existing font,
  284. so make sure you have a backup.
  285.  
  286.  
  287. Entering a <RETURN> without any selection at the option menu returns
  288. to the text entering screen.
  289.  
  290. If you have a dot matrix printer with a download character set, you
  291. may want to change the @ sign to a solid block for darker banners.
  292. On the Gemini-10X the maximum size block of this type is 5 X 7 pins.
  293. For a slightly smoother character set in the banner, omit the corner
  294. dots in this block.  If your printer does not have the download
  295. character set, check to see if there are graphics blocks accessed
  296. some other way.
  297.  
  298.                 FONTCODE
  299.  
  300.  
  301. FONTCODE will let you change existing fonts, extend them to add
  302. missing characters or create your own from scratch.
  303.  
  304. FONTCODE creates the compressed data files that FONTSY uses for
  305. printing banners.  To generate a new font, you simply create a text
  306. file with your word processor in non document mode that is exactly
  307. like each large letter you want in a font. There will be some
  308. distortion of the letter on the screen.  Normally a character on
  309. screen should be made to appear too wide.  The rows on a printer are
  310. usually more compressed.  If you need a sample, use FONTCODE to
  311. extract a character from one of the standard fonts.
  312.  
  313. Each file in a font must have the same main filename.  They should
  314. only differ in the extension.  For example:
  315.  
  316. HERON.065    Contains the raw data for the large letter A
  317. HERON.066    Contains the raw data for the large letter B
  318. HERON.067    Contains the raw data for the large letter C
  319. HERON.068    Contains the raw data for the large letter D
  320.    etc.
  321.  
  322. The number in the extension is the decimal ASCII value of the large
  323. letter.  You need not create all 95 possible characters for your
  324. font.  A font could contain only one character and still be encoded
  325. by FONTCODE.  You could even create a non alphabet "font" that would
  326. have something like an apple when you hit "A" and a bat when you hit
  327. "B" or any other block graphic image.  These could be used to
  328. decorate a banner printed with one of the regular fonts.  DINGBAT.FNT
  329. is an example of this type of "font".
  330.  
  331.  
  332.             Running FONTCODE
  333.  
  334. If you want to modify an existing encoded font you can specify the
  335. font at the DOS command line by entering:
  336.  
  337. FONTCODE <fontname>
  338.  
  339. The extension is not required.  You may also select an encoded font
  340. to modify at the main menu.  If you have selected a font from DOS,
  341. your font will be indicated by the menu.  Example:
  342.  
  343.     FONTCODE  Version 2.0     9/2/86   (C) 1985,1986 Merlin R. Null
  344.  
  345.  The current font is: GOTHIC.FNT
  346.  
  347.  Title: Gothic (Old English) version 1.0
  348.     Requires 132 columns
  349.  
  350.              Characters included in this font are:
  351.        space ! " # $ & ' ( ) , - . 0 1 2 3 4 5 6 7 8 9 : ; ? A B C D E F
  352.        G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m
  353.        n o p q r s t u v w x y z
  354.  
  355.       1. Load an existing font (encoded)
  356.       2. Load a full set of font characters (text)
  357.       3. Open a new font
  358.       4. Load a single font character (text)
  359.       5. Unload a single character from the current font
  360.       6. Unload all of the current font to text files
  361.       7. Save the current font
  362.       8. Change font defaults
  363.       9. Modify font text files (menu #2)
  364.  
  365. Option (1-9) or <Esc> to exit ? _
  366.  
  367. Option 1.  Load an existing font (encoded).  Will just load an
  368. encoded font, if you forgot to name it at the CP/M command line.
  369.  
  370. Option 2.  Load a full set of font characters (text).  This will
  371. create an encoded font from scratch.  You will be prompted for, font
  372. name title, print character (the default character to print each
  373. pixel), margin (offset to center the banner) and number of rows
  374. between each large character.  FONTCODE will then look for all source
  375. files for the font you have named.  These files must have exactly the
  376. same filename as your output font.  They will differ only in the
  377. extension.  The source files have numeric extension and the output
  378. file should have the extension .FNT.  You can specify the extension
  379. of the encoded font to be something other than FNT, but to use this
  380. font with FONTSY, you would have to give the extension to load it.
  381. It takes quite a while to encode a full font.  FONTCODE would have to
  382. read in 95 files.  Disk access is what takes the time.
  383.  
  384. Option 3.  Open a new font.  This just sets up the fontname, title
  385. and defaults so that font source files may be read in one at a time
  386. with function 4.  Do not open a new font if all you want to do is
  387. modify an existing font.  This option is just for generating encoded
  388. fonts from scratch.  Option 2 does not require a separate opening of
  389. the font.
  390.  
  391. Option 4.  Load a single font character (text).  This is how you
  392. bring in a modified character to a previously encoded font or add a
  393. new character.  After selecting this option, characters are added to
  394. the font by entering a single keystroke followed by <RETURN>.
  395.  
  396. Option 5.  Unload a single character from the current font.  This
  397. will recreate a source (text) file for single character.  Use this if
  398. you want to modify only a few characters.  Try this on one of the
  399. fonts in this library to see the structure of the source files.
  400.  
  401. Option 6.  Unload all of the current font to text files.  If you want
  402. to do extensive modification of a font, or use an existing font as a
  403. framework for generating a new one, you can recreate the source for
  404. an entire font at one time.  Be sure you have lots of disk space
  405. available.  This will generate from 100K to over 200K for a large
  406. font.  The source files for the font HERON take up 196K with a 2K
  407. cluster size on my hard disk.  With 1K clusters on floppy, this
  408. number will be reduced a fair amount.  The byte count stays the same
  409. on both cases.  Just the storage space required changes.
  410.  
  411. Option 7.  Save the current font.  If you forget to save a modified
  412. font, you will be prompted to do so before you exit or load a new
  413. font.
  414.  
  415. Option 8.  Change font defaults.  Use this option to change the title
  416. or any of the font default values on previously encoded fonts.
  417.  
  418. Option 9.  Modify font text files.  Really a gateway to menu #2.  All
  419. of the sub options of menu #2 deal only with font source files.  They
  420. are not for use with encoded fonts.  The menu:
  421.  
  422.             Modify font text files
  423.  
  424.         For modifying banner font source files
  425.  
  426.     1. Rotate a single output file 180 degrees
  427.  
  428.     2. Rotate a single output file 90 degrees clockwise
  429.  
  430.     3. Invert line order of a single file
  431.  
  432.     4. Rotate a full font 180 degrees
  433.  
  434.     5. Rotate a full font 90 degrees clockwise
  435.  
  436.     6. Invert line order of a full font
  437.  
  438. Option or <Esc> to exit ? _
  439.  
  440.  
  441. Option 9.1 Rotate a single output file 180 degrees.  For example,
  442. suppose you have created the lower case letter p for your new font
  443. FOO.  This would be in a file named FOO.112.  You can create a lower
  444. case d with option 1.  Specify FOO.112 as the input file and FOO.100
  445. as the output.  It is much easier to modify existing files than
  446. create new ones from scratch.
  447.  
  448. Option 9.2 Rotate a single output file 90 degrees clockwise.  Useful
  449. when creating a horizontal font from a vertical one.
  450.  
  451. Option 9.3 Invert line order of a single file.  As with the example
  452. in option 9.1, input FOO.114 and specify the output as FOO.113 to
  453. generate the lower case q, and input FOO.100 to get FOO.098 the lower
  454. case b.
  455.  
  456. Options 9.4 - 9.6 are merely full font versions of the first three
  457. options.  These options require that the input filename without
  458. extension be different from the output filename.  You will also need
  459. lots of disk space, up to 300K, depending on the font size.  If you
  460. ware working on floppys, put the source files on one disk and direct
  461. the output to a second drive.
  462.  
  463. If you are working on a floppy system you might want to use a
  464. subdirectory.  The root directory is often limited to 112 entries.
  465. This limit does not apply in a subdirectory.  If you unload a full 95
  466. character font the 112 limit can be quickly reached.  On a hard disk
  467. you should have no problems.
  468.  
  469.               Font Structure
  470.  
  471. With Fontsy the data files are only about 6-8K for a full 95
  472. character font.  That is because there is not a full character or bit
  473. map of the font.  The data only includes two bytes for each segment
  474. on a given row.  First, what column to start printing and second, how
  475. many pixels in succession.  If it is the last segment in a given row,
  476. the 8th bit is set high on the second byte to represent the carriage
  477. return, line feed.
  478.  
  479. The encoded font contains a header with five records containing 1.
  480. the title and copyright notice for the font, 2. an optional comment
  481. or subtitle record, plus the font default values: 3. Print character,
  482. 4. margin value and 5. rows between banner characters.  This is
  483. followed by one record for each character (6-100).  Within each field
  484. blank lines are represented by the single byte FF hex.  A segment of
  485. pixels to print is defined by two bytes.  The first giving the row to
  486. print (with an offset of decimal 32), followed by the number of
  487. pixels to print (also with an offset of 32 decimal).  If this segment
  488. is the final one in a row, the 8th bit is set on the number of pixels
  489. byte.  Example:
  490.  
  491.            @@@@@@@@@@      @@@@@@
  492.            ^          ^
  493.        column 16          column 35
  494.  
  495. This would be encoded as: 30h 2Ah 43h A6h.  These four bytes replace
  496. 41 bytes of spaces and @ signs, the carriage return and line feed.
  497. The final byte in the record is followed by 0Dh 0Ah as the record
  498. delimiter.
  499.  
  500. After the font data comes 5 more records.  101. Printer
  501. initialization string, 102. Printer reset string, 103. Horizontal
  502. multiplier (rows), 104. Vertical multiplier (columns) and 105.
  503. Vertical divisor (columns).
  504.  
  505.               Compiling the Source Code
  506.  
  507. If you want to make changes to your copy of the source code, compile
  508. with the switches as follows:
  509.  
  510. QB FONTSY /O/E;
  511.  
  512. Assemble the video routines with no special switches:
  513.  
  514. MASM FSY;
  515.  
  516. And link the object code:
  517.  
  518. LINK FONTSY + FSY + SMALLERR /E;
  519.  
  520. The /E switch causes the executable file to be about 3K shorter.  It
  521. is not documented in the QuickBASIC manual, but is covered in the
  522. MASM documentation.  It will shorten any stand alone program compiled
  523. with QuickBASIC.  It does not help much with programs linked to the
  524. external runtime package, BRUN20.EXE.
  525.  
  526.                References
  527.  
  528. There are many books of fonts suitable for source material for banner
  529. fonts.  I have used the following books to a greater or less degree
  530. in generating some of the fonts:
  531.  
  532. 1. ABC of Lettering and Printing Typefaces by Erik Lindgren
  533.    Greenwich House, New York 1982
  534.  
  535. 2. Letter Forms, 110 Complete Alphabets by Frederick Lambert
  536.    Dover Publications, Inc., New York 1972
  537.    Originally published London 1964
  538.  
  539. 3. The ABC of Lettering by J. I. Biegeleisen 5th edition
  540.    Harper & Row, Publishers, Inc., New York 1976
  541.  
  542. Look for books with both upper and lower case, punctuation and a
  543. large variety of additional characters.
  544.  
  545. I find it easier to do the large character files if I first graph
  546. them out on 10 square per inch fadeout paper.  Two squares per small
  547. character.  The files could be done from scratch on the screen but
  548. the perspective distortion makes this difficult for any character
  549. with a curve or diagonal.
  550.  
  551.  
  552.               LEGAL NOTICE
  553.  
  554. Fontsy, Fontcode, this documentation and the fonts HERON.FNT,
  555. KIWI.FNT, CLARE.FNT, CLARENDN.FNT and RAVEN.FNT are NOT "Public
  556. Domain." Copyright on each is held by the author:
  557.  
  558.                 Merlin R. Null
  559.                 P. O. Box 9422
  560.                 N. Hollywood, CA 91609
  561.                 (818) 762-1429
  562.  
  563. Feel free to make copies of the programs for your own use or for your
  564. friends.  However, they may NOT be sold or included with any
  565. collection of programs for sale or used as an inducement to buy
  566. another product or program without the written permission of the
  567. author.  Permission is also given for nonprofit computer clubs to
  568. include this program in distribution disks, provided total charges
  569. for the entire disk of programs, copying and shipping do not exceed
  570. $20.00.  My vote of thanks goes to those clubs that have kept their
  571. charges under $10.00.
  572.  
  573. Portions of the compiled programs FONTSY.EXE and FONTCODE.EXE are
  574. Copyrighted by Microsoft Corp. 1982, 1983, 1984, 1985, 1986.
  575.  
  576. MASM AND QuickBASIC are Trademarks of Microsoft Corporation
  577. 
  578.